Conversation
| styleName="delete-icon" | ||
| onClick={() => onDelete(submissionObject.id)} | ||
| type="button" | ||
| disabled={!allowDelete} |
There was a problem hiding this comment.
[correctness]
The disabled attribute is conditionally set based on allowDelete, but the logic for showDeleteButton already checks for allowDelete indirectly through safeForDownloadCheck. Consider reviewing the conditions to ensure they align with the intended behavior.
| status, | ||
| allowDelete, | ||
| hasPendingWorkflowRuns, | ||
| isWorkflowRunComplete, |
There was a problem hiding this comment.
[❗❗ correctness]
The variable isWorkflowRunComplete is used to determine if the delete button should be enabled. Ensure that this variable accurately reflects the completion status of the workflow run, as any discrepancy could lead to incorrect UI behavior.
| */ } | ||
| {showDeleteButton && ( | ||
| !showPendingTooltip ? ( | ||
| isWorkflowRunComplete ? ( |
There was a problem hiding this comment.
[❗❗ correctness]
The logic for enabling the delete button has been changed to depend on isWorkflowRunComplete. Verify that this change aligns with the intended business logic, as it alters when a submission can be deleted.
| const allowDelete = submissionPhaseStartDate | ||
| && moment(subObject.submissionDate).isAfter(submissionPhaseStartDate) | ||
| && isWorkflowRunComplete; | ||
| && moment(subObject.submissionDate).isAfter(submissionPhaseStartDate); |
There was a problem hiding this comment.
[❗❗ correctness]
The allowDelete logic has been changed to no longer consider isWorkflowRunComplete. If this was intentional, ensure that it aligns with the desired behavior. If not, this could lead to allowing deletions when there are incomplete workflow runs.
| onOpenDownloadArtifactsModal={onOpenDownloadArtifactsModal} | ||
| onOpenRatingsListModal={onOpenRatingsListModal} | ||
| hasPendingWorkflowRuns={hasPendingWorkflowRuns} | ||
| isWorkflowRunComplete={isWorkflowRunComplete} |
There was a problem hiding this comment.
[❗❗ correctness]
The prop hasPendingWorkflowRuns was replaced with isWorkflowRunComplete. Ensure that the Submission component is updated accordingly to handle this change, as it may affect the component's logic.
No description provided.